{layout '../Public/sideForm.latte'}
{block title}设置{/block}
{block private_css}
{/block}
{block private_js}
    <script type="text/javascript">
        init.ready(function () {
            if (typeof window.timerdeadlineList !== "undefined") {
                clearInterval(window.timerdeadlineList);
            }
            window.timerdeadlineList = setInterval(function () {
                $("[data-deadline]").each(function () {
                    var endTimes = $(this).attr("data-deadline");
                    var cTime = countDown(endTimes);
                    if (cTime == '0秒') {
                        var cTime = '已超时';
                    }
                    $(this).text(cTime);
                });
            }, 1000);
        });
    </script>
{/block}
{block content}
    <form class="stdform mform" method="post" action={$url}>
        <table cellpadding="0" cellspacing="0" border="0" id="frmtable" class="formtable">
            <thead>
            <tr>
                <td><label>项目名称</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <input type="text" id="frm_names" name="names" class="smallinput" value="{$lists['names']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>负责人：</label></td>
                <td>
                    <div class="field control-group">
                        {$leader|noescape}
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>成员：</label></td>
                <td>
                    <div class="field control-group">
                        {$members|noescape}
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>期限：</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <input type="text" class="laydate laydate-icon" readonly name="endTime" id="endTime" value="{totime($lists['endTime'])}">
                            <span style="border: 1px solid #ccc;line-height: 19px; height: 32px;background: #f2f2f2;padding: 0 10px;">
                            {if $lists["endTime"]}
                                目前还剩下:
                                <span data-deadline="{$lists["endTime"]|totime}"></span>


                                                                                                     {else}


                                <span>已经到期</span>
                            {/if}
                                </span>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>阶段：</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <select name="status" id="status">
                                {foreach $status as $key=>$item}
                                    <option value="{$key}" {if $key==$lists['status']}selected{/if}>{$item}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>排序：</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <input type="text" id="frm_names" name="sort" class="smallinput" value="{$lists['sort']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>项目简介：</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <textarea id="frm_memo" name="memo">{$lists['memo']}</textarea>
                        </div>
                    </div>
                </td>
            </tr>
            </thead>
        </table>
    </form>
{/block}